package com.example.demo.Controller;

import com.example.demo.Service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/bookDel")
public class BookListDelController {

    @Autowired
   private BookService bookService;

    @RequestMapping("/delete")
    public Boolean delBookList(Integer id){
       boolean flag =  bookService.deleteBook(id);
       return flag;
    }
    @RequestMapping("/listDelete")
    public Boolean delBookLists(@RequestParam List<Integer> ids){
         boolean flag = bookService.deleteBooks(ids);
         return flag;
    }
}
